package com.vunguyen.model;
// Generated Dec 27, 2014 4:28:42 PM by Hibernate Tools 3.6.0


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Phieudangky generated by hbm2java
 */
@Entity
@Table(name="phieudangky"
    ,catalog="qlkhoacntt"
)
public class Phieudangky  implements java.io.Serializable {


     private Integer idPhieu;
     private Giangvien giangvien;
     private int tuan;
     private Date ngay;
     private int tiet;
     private int soTiet;
     private String lyDo;
     private int xacNhan;
     private Phieubaonghi phieubaonghi;
     private Phieudoigiangvien phieudoigiangvien;
     private Phieudoiphong phieudoiphong;

    public Phieudangky() {
    }

	
    public Phieudangky(Giangvien giangvien, int tuan, Date ngay, int tiet, int soTiet, String lyDo, int xacNhan) {
        this.giangvien = giangvien;
        this.tuan = tuan;
        this.ngay = ngay;
        this.tiet = tiet;
        this.soTiet = soTiet;
        this.lyDo = lyDo;
        this.xacNhan = xacNhan;
    }
    public Phieudangky(Giangvien giangvien, int tuan, Date ngay, int tiet, int soTiet, String lyDo, int xacNhan, Phieubaonghi phieubaonghi, Phieudoigiangvien phieudoigiangvien, Phieudoiphong phieudoiphong) {
       this.giangvien = giangvien;
       this.tuan = tuan;
       this.ngay = ngay;
       this.tiet = tiet;
       this.soTiet = soTiet;
       this.lyDo = lyDo;
       this.xacNhan = xacNhan;
       this.phieubaonghi = phieubaonghi;
       this.phieudoigiangvien = phieudoigiangvien;
       this.phieudoiphong = phieudoiphong;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idPhieu", unique=true, nullable=false)
    public Integer getIdPhieu() {
        return this.idPhieu;
    }
    
    public void setIdPhieu(Integer idPhieu) {
        this.idPhieu = idPhieu;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idCanBo", nullable=false)
    public Giangvien getGiangvien() {
        return this.giangvien;
    }
    
    public void setGiangvien(Giangvien giangvien) {
        this.giangvien = giangvien;
    }

    
    @Column(name="Tuan", nullable=false)
    public int getTuan() {
        return this.tuan;
    }
    
    public void setTuan(int tuan) {
        this.tuan = tuan;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="Ngay", nullable=false, length=10)
    public Date getNgay() {
        return this.ngay;
    }
    
    public void setNgay(Date ngay) {
        this.ngay = ngay;
    }

    
    @Column(name="Tiet", nullable=false)
    public int getTiet() {
        return this.tiet;
    }
    
    public void setTiet(int tiet) {
        this.tiet = tiet;
    }

    
    @Column(name="SoTiet", nullable=false)
    public int getSoTiet() {
        return this.soTiet;
    }
    
    public void setSoTiet(int soTiet) {
        this.soTiet = soTiet;
    }

    
    @Column(name="LyDo", nullable=false)
    public String getLyDo() {
        return this.lyDo;
    }
    
    public void setLyDo(String lyDo) {
        this.lyDo = lyDo;
    }

    
    @Column(name="XacNhan", nullable=false)
    public int getXacNhan() {
        return this.xacNhan;
    }
    
    public void setXacNhan(int xacNhan) {
        this.xacNhan = xacNhan;
    }

@OneToOne(fetch=FetchType.EAGER, mappedBy="phieudangky")
    public Phieubaonghi getPhieubaonghi() {
        return this.phieubaonghi;
    }
    
    public void setPhieubaonghi(Phieubaonghi phieubaonghi) {
        this.phieubaonghi = phieubaonghi;
    }

@OneToOne(fetch=FetchType.EAGER, mappedBy="phieudangky")
    public Phieudoigiangvien getPhieudoigiangvien() {
        return this.phieudoigiangvien;
    }
    
    public void setPhieudoigiangvien(Phieudoigiangvien phieudoigiangvien) {
        this.phieudoigiangvien = phieudoigiangvien;
    }

@OneToOne(fetch=FetchType.EAGER, mappedBy="phieudangky")
    public Phieudoiphong getPhieudoiphong() {
        return this.phieudoiphong;
    }
    
    public void setPhieudoiphong(Phieudoiphong phieudoiphong) {
        this.phieudoiphong = phieudoiphong;
    }




}


